maintainer="Michał Polański <michal@polanski.me>"
pkgname=fq
pkgver=0.13.0
pkgrel=0
pkgdesc="Tool, language and decoders for inspecting binary data"
url="https://github.com/wader/fq"
license="MIT"
arch="all !ppc64le" # fails tests
makedepends="go"
checkdepends="expect"
options="net"
source="https://github.com/wader/fq/archive/v$pkgver/fq-$pkgver.tar.gz
	enable-cgo.patch"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make fq
}

check() {
	GO_TEST_RACE_FLAGS= make test
}

package() {
	install -Dm755 fq -t "$pkgdir"/usr/bin/
}

sha512sums="
c510e7c72e08c1267eb17060cd1969af4885e6d861d57951671118d79879f18173fae88384687f23797158433b567969c2ad0e5b5b3f97658d6fa1b7b1c7f7f1  fq-0.13.0.tar.gz
0d1857a6ffd0f85a5de0f57a4f2aea521523c4a738a4805cd1c83644610a6ca51684f92db97eeff1e9bddd57800d0e66d2447fa95af25de82a5177c7e4a338cb  enable-cgo.patch
"
